<template>
  <div>
    <!-- 限制input框只能输入数字 -->
    <el-input v-model="inputValue" v-only-number.positive="3" clearable />

    <div>{{ inputValue }}----{{ typeof inputValue }}</div>

    <el-button @click="handlePrint">打印</el-button>
  </div>
</template>
<script>
export default {
  data() {
    return { inputValue: "" };
  },
  methods: {
    handlePrint() {
      console.log("打印", this.inputValue);
    },
  },
};
</script>
